//
//  Ugc_releasTopic_Cell_WX.m
//  ZITHER
//
//  Created by weixin on 2019/2/20.
//  Copyright © 2019 weixn. All rights reserved.
//

#import "Ugc_releasTopic_Cell_WX.h"

@implementation Ugc_releasTopic_Cell_WX
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    [self addSubview:self.TopicLab];
    [self addSubview:self.TopicIcon];
    
    
    [self.TopicLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(7.5);
        make.left.equalTo(self).offset(0);
        make.right.equalTo(self).offset(-10);
        make.bottom.equalTo(self).offset(-7.5);
    }];
    
    [self.TopicIcon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.TopicLab.mas_top).offset(5);
        make.left.equalTo(self.TopicLab.mas_left).offset(0);
        make.size.mas_equalTo(CGSizeMake(10, 13));
    }];
    
}

-(void)setModel:(UGC_TopicSubjectslist_modelList *)model{
    _model = model;
    self.TopicLab.text =[NSString stringWithFormat:@"     %@",model.title];
    NSLog(@"%@",self.TopicLab.text);
}


-(BaseLab *)TopicLab{
    if (!_TopicLab) {
        _TopicLab = [BaseLab initCustomLab:@"     1232131" color:HexColor(0x333333) font:[UIFont fontWithName:@"PingFangSC-Semibold" size:14]];
        _TopicLab.textAlignment = NSTextAlignmentLeft;
        _TopicLab.numberOfLines = 2;
//        _TopicLab.backgroundColor = [UIColor redColor];
        _TopicLab.lineBreakMode = NSLineBreakByCharWrapping;
    }
    return _TopicLab;
}

-(BaseImageV *)TopicIcon{
    if (!_TopicIcon) {
        _TopicIcon = [[BaseImageV alloc]init];
        _TopicIcon.image = [UIImage imageNamed:@"发布_#话题"];
        _TopicIcon.backgroundColor = [UIColor clearColor];
    }
    return _TopicIcon;
}


@end
